package kr.couponplay.android.support;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class NetworkCheckUtils {
	public static boolean isConnected(Context context) {
	    ConnectivityManager manager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
	    NetworkInfo mobile = manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
	    NetworkInfo wifi = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);

	    if (mobile.isConnected() || wifi.isConnected()) {
	        return true;
	    }
	    return false;
	}
}
